package com.hs.device.ups.controller;

import com.hs.communication.common.entity.UpsData;
import com.hs.device.ups.service.UpsRealInfoService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/ups")
public class UpsController {

    @Resource
    private UpsRealInfoService upsRealInfoService;

    @PostMapping("/real")
    public void insertRealInfo(@RequestBody UpsData upsRealInfo) {
        System.out.println("ups real被调用");
        upsRealInfoService.insert(upsRealInfo);
    }
}
